<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<title>会员管理</title>
</head>

<body>

<div class="container">
<%@include file="head.jsp"%>
<%@include file="left.jsp"%>
 <div class="right-menu">
  <div class="main-hd">
   <div class="page-teb" >
    <div class="l-tab-links">
     <ul style="left:0;">
      <li class="l-select">
       <a href="<%=basePath%>index.jsp" style="padding:0 25px;">首页</a>
      </li>
       <li class="l-select">
       <a href="#">会员管理</a>
        <span class="close"></span>
      </li>
     </ul>
    </div>

    <div class="l-tab-content" style="background:#fff;">
     <div class="tab-content-item">
      <div class="home">
      
      <form action="${pageContext.request.contextPath }/members/memberslist.html" method="post">
      <!--员工管理   开始-->
        <div class="con-header">
         <ul class="ui-inline">
          <li>
           <select class="select-txt" style="width: 120px;" name="typeid" id="typeid">
           <option value="0">请选择会员类型</option>
           <c:forEach items="${memtype }" var="mem" >
                      <c:if test="${typeid==mem.typeId }">
						<option value="${mem.typeId}" selected="selected">${mem.level}</option>
					</c:if>
					<c:if test="${typeid!=mem.typeId }">
           <option value="${mem.typeId}">${mem.level}</option></c:if>
           </c:forEach>
           </select>
          </li>
          <li>
           <input type="text" class="ui-kh" placeholder="请输入会员编号/姓名/电话查询" style="width:230px;" name="name"
            <c:if test="${not empty name }">value="${name}"</c:if>">
          </li>
          <li>
           <input type="submit" class="ui-btn11 ui-btn-search" value="查询">
          </li>
         </ul>
        </div>
        
        <div class="yg-gl">
         <div class="khgl-rg " style="margin-bottom:15px;">
          <a href="${pageContext.request.contextPath}/members/addmember.html" class="xz">新增</a>
          
         </div>
         <div class="yg-tab">
            <table class="gridbar" border="0" cellpadding="0" cellspacing="0">
             <tr>
              <th width="60"><input type="checkbox" style="text-align:center;"></th>
              <th width="50" style="text-align:center;">操作</th>
              <th width="140" style="text-align:center;">会员卡号</th>   
              <th width="100" style="text-align:center;">会员类型</th>
              <th width="130" style="text-align:center;">会员名称</th>
              <th width="80" style="text-align:center;">会员性别</th>
              <th width="170" style="text-align:center;">会员地址</th>
              <th width="170" style="text-align:center;">会员生日</th>
              <th width="180" style="text-align:center;">会员电话</th>
              <th width="170" style="text-align:center;">总消费</th>
              <th width="170" style="text-align:center;">总积分</th>
             </tr>
          </table>
          <c:forEach var="mem" items="${members }">
          <table class="gridbar bar" border="0" cellpadding="0" cellspacing="0" >
             <tr>
              <td width="60"><input type="checkbox" style="text-align:center;"></td>
              <td width="50" style="text-align:center;">
               <a href="${pageContext.request.contextPath}/members/updatemember.html?membersid=${mem.membersid}">
               <img src="<%=basePath%>statics/img/xg1.png"></a>
              </td>
              <td width="140" style="text-align:center;">${mem.cardid }</td>
              <td width="100" style="text-align:center;">${mem.membertype.level }</td>
              <td width="130" style="text-align:center;">${mem.name }</td>
              <td width="80" style="text-align:center;">${mem.sex }</td>
              <td width="170" style="text-align:center;">${mem.address }</td>
              <td width="170" style="text-align:center;"><fmt:formatDate value="${mem.birthday }" pattern="yyyy-MM-dd"/></td>
              <td width="180" style="text-align:center;">${mem.phone }</td>
              <td width="170" style="text-align:center;">${mem.totalmoney }</td>
              <td width="170" style="text-align:center;">${mem.integral }</td>
             </tr>             
           </table>
           </c:forEach>
           </div>
           <div class="lu"> 
                 <span><a href="members/memberslist.html?pageNo=1&typeid=${typeid }$name=${name }">首页</a></span>
				 <span><a href="members/memberslist.html?pageNo=${pager.pageNo+1 }&typeid=${typeid }$name=${name }">下一页</a></span> 
				 <span><a href="members/memberslist.html?pageNo=${pager.pageNo-1 }&typeid=${typeid }$name=${name }">上一页</a></span> 
				 <span><a href="members/memberslist.html?pageNo=${pager.totalPage }&typeid=${typeid }$name=${name }">末页</a></span>            
                 <span>第${pager.pageNo}/${pager.totalPage }页&nbsp;</span>共<i>${pager.totalCount }</i>条记录</div>
       </div>
         <div class="tab-btn">
        <div class="bt-rg">
         <ul>
          <li><button>打印</button></li>
         </ul>
        </div>
       </div>
        </div>          
      <!--员工管理   结束-->
      </form>
      
      </div>
     </div>
    </div>
   </div>
  </div>
 </div>
</div>
  
</body>
</html>
